<template>
	<view class="center">
		<u-navbar leftIcon="" title="" bgColor="transparent" placeholder></u-navbar>
		<z-navbar imgUrl="/static/image/logo/logo.png">
		</z-navbar>
		<amap></amap>
		<view class="plan">
			<view class="plan-box">
				<image src="/static/my/plan.png" mode=""></image>

				<view class="plan-title flex align-center">
					<u-loadmore iconColor="#fff" fontSize="30rpx" color="#fff" v-if="status === 'loading'"
						:status="status" loadingText="旅行计划生成中..." />
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import zNavbar from '@/components/z-navbar/z-navbar.vue';
	import amap from '@/components/amap/amap.vue';

	import {
		ref,
		computed
	} from 'vue';

	import {
		onLoad
	} from '@dcloudio/uni-app';

	// 加载中状态
	const status = ref('loading');

	// planid
	const planUuid = ref('');

	onLoad((e) => {
		planUuid.value = e.planUuid;
		setTimeout(() => {
			uni.redirectTo({
				url: `/tourism-schedule-pages/tourism-schedule/tourism-schedule?planUuid=${planUuid.value}`
			})
		}, 2500);
	})
</script>

<style lang="scss">
	:deep(.u-loadmore__content) {
		margin: 0 !important;
	}

	.center {
		height: 100vh;
		overflow: hidden;
	}

	.plan {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);

		.plan-box {
			width: 640rpx;
			height: 120rpx;
			border-radius: 60rpx;
			background: rgba(0, 0, 0, 0.7);
			position: relative;

			image {
				position: absolute;
				top: -10%;
				left: 20%;
				transform: translate(-50%, -50%);
				width: 240rpx;
				height: 240rpx;
			}

			.plan-title {
				position: absolute;
				top: 50%;
				left: 60%;
				transform: translate(-50%, -50%);
				color: #fff;
				font-size: 30rpx;
			}
		}
	}
</style>
